Huge=[[None,None]]*10 #a huge array containing garbage
A=[0]*5
def insert(k,d):#the element is key[ele]=k, satilite_data[ele]=d
    A[0]+=1
    A[A[0]]=k
    Huge[k]=[A[0],d]
def search(k):
    i,data=Huge[k]
    if A[i]!=k:
        raise Exception('No such element')
    else:
        return data
def delete(k):
    i,data=Huge[k]
    Huge[k]=(None,None)
    Huge[A[A[0]]][0]=i#exchange i with the last one
    A[i],A[A[0]]=A[A[0]],A[i]
    A[0]-=1

if __name__=='__main__':
    insert(2,'2')
    insert(3,'3')
    print Huge
    delete(2)
    print Huge
    print 'element with key 3:', search(3)
